package com.sopaths.crawler.monitor;

import javax.annotation.Resource;
import javax.inject.Named;

import com.sopaths.crawler.thread.CrawlerTaskExecutor;

@Named
public class CrawlerMonitor {

	@Resource(name = "cityCrawlerTaskExecutor")
	private CrawlerTaskExecutor cityCrawlerTaskExecutor;

	@Resource(name = "totalPageCrawlerTaskExecutor")
	private CrawlerTaskExecutor totalPageCrawlerTaskExecutor;

	@Resource(name = "summaryCrawlerTaskExecutor")
	private CrawlerTaskExecutor summaryCrawlerTaskExecutor;

	@Resource(name = "recruitmentCrawlerTaskExecutor")
	private CrawlerTaskExecutor recruitmentCrawlerTaskExecutor;

	public int getCapacityOfCityCrawlerTasks() {
		return cityCrawlerTaskExecutor.getQueueSize();
	}
	public int getRemainCityCrawlerTasks() {
		return cityCrawlerTaskExecutor.getRemainTasks();
	}

	public int getCapacityOfTotalPageCrawlerTasks() {
		return totalPageCrawlerTaskExecutor.getQueueSize();
	}
	public int getRemainTotalPageCrawlerTasks() {
		return totalPageCrawlerTaskExecutor.getRemainTasks();
	}

	public int getCapacityOfSummaryCralwerTasks() {
		return summaryCrawlerTaskExecutor.getQueueSize();
	}
	public int getRemainSummaryCarwlerTasks() {
		return summaryCrawlerTaskExecutor.getRemainTasks();
	}

	public int getCapacityOfRecruitmentCrawlerTasks() {
		return recruitmentCrawlerTaskExecutor.getQueueSize();
	}
	public int getRemainRecruitmentCrawlerTasks() {
		return recruitmentCrawlerTaskExecutor.getRemainTasks();
	}

	public CrawlerTaskExecutor getCityCrawlerTaskExecutor() {
		return cityCrawlerTaskExecutor;
	}

	public void setCityCrawlerTaskExecutor(
			CrawlerTaskExecutor cityCrawlerTaskExecutor) {
		this.cityCrawlerTaskExecutor = cityCrawlerTaskExecutor;
	}

	public CrawlerTaskExecutor getTotalPageCrawlerTaskExecutor() {
		return totalPageCrawlerTaskExecutor;
	}

	public void setTotalPageCrawlerTaskExecutor(
			CrawlerTaskExecutor totalPageCrawlerTaskExecutor) {
		this.totalPageCrawlerTaskExecutor = totalPageCrawlerTaskExecutor;
	}

	public CrawlerTaskExecutor getSummaryCrawlerTaskExecutor() {
		return summaryCrawlerTaskExecutor;
	}

	public void setSummaryCrawlerTaskExecutor(
			CrawlerTaskExecutor summaryCrawlerTaskExecutor) {
		this.summaryCrawlerTaskExecutor = summaryCrawlerTaskExecutor;
	}

	public CrawlerTaskExecutor getRecruitmentCrawlerTaskExecutor() {
		return recruitmentCrawlerTaskExecutor;
	}

	public void setRecruitmentCrawlerTaskExecutor(
			CrawlerTaskExecutor recruitmentCrawlerTaskExecutor) {
		this.recruitmentCrawlerTaskExecutor = recruitmentCrawlerTaskExecutor;
	}
}
